<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="Keywords" content="">
	<meta name="description" content="">
	<link rel="shortcut icon" type="image/x-icon" href="/static/images/favicon.ico">
	<!--公共部分-->
	<link href="/static/www/css/layout.css" type="text/css" rel="stylesheet" />
	<script src="/static/public/jquery-1.11.1.min.js" type="text/javascript"></script>
	<!--私有部分-->
	<link href="/static/www/css/default.style.css" type="text/css" rel="stylesheet" />
  <script src="/static/public/layer/layer.js" type="text/javascript"></script>

	<title>登录 </title>

	<script>
	$(function () {
	
		//登录
		$("#btn_submit").click(function () {
			var phone = $("#phone").val();
			var pwd = $("#pwd").val();
			if(phone==""){
				layer.tips('请输入手机号', '#phone', {time: 5000});
				return;
			}
			if(pwd==""){
				layer.tips('请输入密码', '#pwd', {time: 5000});
				return;
			}
			$.post('/login/iframe',{'phone':phone,'pwd':pwd},function (res) {
				var obj = eval('(' + res + ')');
				if(obj.result==0){
					//登录成功
					parent.login_success();
				}else{
					if(obj.result == 404){
						layer.tips(obj.msg, '#phone', {time: 5000});
					}else if(obj.result == 400) {
						layer.tips(obj.msg, '#pwd', {time: 5000});
					}else {
						layer.msg(obj.msg,  {time: 5000});
					}

				}
				// alert(obj.result);
			});
		});


	})
	</script>
</head>
<body>
<div class="registerMain">
    <div class="mt"><span class="fs20">登录</span><a href="/reg/iframe">注册</a></div>
    <div class="mc" id="login_div">
        <div class="formLoginRegister">
        
            <ul>
                <li class="iFrTit"><span name="fr_tit"><img src="/static/www/images/i_login.png"></span>
                <input class="text" id="phone" name="phone" maxlength="11" type="text" placeholder="请输入手机号码">
                
                </li>
                <li class="iFrTit"><span name="fr_tit"><img src="/static/www/images/i_regis.png"></span>
                <input class="text" id="pwd" name="pwd" type="password" value="" maxlength="12" placeholder="请输入密码，6-12位">
                
                </li>
            </ul>
            <div class="p-lr10">
            <label>&nbsp;&nbsp;</label><a class="r" href="javascript:;">忘记密码</a>
            </div>
            <div class="p-t20"><a href="javascript:;" id="btn_submit" ty="1" class="b-1aa3fa btn u2 fs20">登录</a></div>
	        <div class="c oh h20 tac">
				<{if isset($err_msg)}><{$err_msg}><{/if}>
			</div>
        </div>
    </div>

</div>

</body>
</html>
